package com.wrs.examsystem.mapper;

import com.wrs.examsystem.entity.Result.R;
import com.wrs.examsystem.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wrs.examsystem.entity.bean.NewUserBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 王荣升
 * @since 2024-05-15
 */
public interface UserMapper extends BaseMapper<User> {
    @Update(" update user set username = #{userName} where user_id = (select user_id from student where student_number = #{number});")
    void updateUserInformateion(@Param("userName") String userName,@Param("number")  String number);
    @Update("update user set newPassword = #{newPassword} where studentNumber = #{studentNumber};")
    void updateUserPassword(@Param("newPassword") String newPassword,@Param("studentNumber") String studentNumber);


}
